package com.chat.common.config;

import ma.glasnost.orika.MapperFacade;
import ma.glasnost.orika.impl.DefaultMapperFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OrikaConfig {
 
	/**
	 * 在容器里面注入一个Orika的对象映射的工具类
	 * @return
	 */
	@Bean
	public MapperFacade mapperFacade() {
		DefaultMapperFactory defaultMapperFactory = new DefaultMapperFactory.Builder().build();
		return defaultMapperFactory.getMapperFacade();
	}
}
